//
//  CardItemView.h
//  3dtest
//
//  Created by XL on 2022/7/21.
//

#import <UIKit/UIKit.h>
@import GLTFSceneKit;
@import SceneKit;

NS_ASSUME_NONNULL_BEGIN

static CGFloat cardLeftSpace = 20;
static CGFloat cardItemSpace = 10;

typedef void(^ClickBlock)(void);

typedef enum : NSUInteger {
    AnimationToLeft = 0,
    AnimationToRight
} CardAniamtionDirection;

@interface CardItemView : UIView

@property (nonatomic , copy) ClickBlock clickBlock;

/// 当前旋转角度
@property (nonatomic , assign) CGFloat currentRotationY;

@property (nonatomic , nonnull , strong) SCNView * scnView;

- (instancetype)initWithFilePath:(NSString *)path;

- (void)flipViewByRate:(CGFloat)rate;

- (void)animationToRatio:(CGFloat)ratio;

- (void)animationToRatio:(CGFloat)ratio status:(BOOL)status isCurrent:(BOOL)isCurrent;

+ (CGFloat)cardWidth;

+ (CGFloat)cardHeight;

@end

NS_ASSUME_NONNULL_END
